import request from './http';
import {SsoAppAccessPolicy} from "@/types/entity";

/**
 * app应用访问控制 前端接口
 */
export default class SsoAppAccessPolicyApi {
  static page(data: SsoAppAccessPolicy) {
    let { index, size, ...vo } = data;
    return request.post(`/ssoAppAccessPolicy/page/${index}/${size}`, vo);
  }

  static save(data: SsoAppAccessPolicy) {
    return request.post<SsoAppAccessPolicy>('/ssoAppAccessPolicy', data);
  }

  static updateEnabled(data: SsoAppAccessPolicy) {
    return request.post<SsoAppAccessPolicy>('/ssoAppAccessPolicy/updateEnabled', data);
  }

  static update(data: SsoAppAccessPolicy) {
    return request.put<SsoAppAccessPolicy>('/ssoAppAccessPolicy', data);
  }

  static delete(ids: number[]) {
    return request.post('/ssoAppAccessPolicy/delete', ids);
  }

  static list(data: SsoAppAccessPolicy) {
    return request.post('/ssoAppAccessPolicy/list', data);
  }

  static getById(id: number) {
    return request.get(`/ssoAppAccessPolicy/get/${id}`);
  }


}
